<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>let 命令-不允许重复声明</title>
    
    <script>
        var x = 3;
        var x = 4;
        console.log(x);// 4

        let y = 1;
        let y = 2;
        console.log(y);// Identifier 'a' has already been declared

    </script>
</head>
<body></body>
</html>